<cpanel setvar="headerimg=../images/mailmenu.gif">
<cpanel setvar="dprefix=../">
<cpanel setvar="headerinclude=mail/pops_head.html">
<cpanel Branding="include(stdheader.html)">
    
<cpanelfeature popaccts>

	<cpanelif $FORM{'itemsperpage'}>
		<cpanel setvar="itemsperpage=$FORM{'itemsperpage'}">
	</cpanelif>

	<cpanelif !$FORM{'itemsperpage'} || !$CPVAR{'itemsperpage'}>
		<cpanel setvar="itemsperpage=10">
	</cpanelif>

</cpanelfeature>

<div class="body-content">
    
<cpanelfeature popaccts>
	
    <cpanel include="managelist.html">
    <div><div class="spriteicon_img_mini" id="icon-manageaccounts_mini"></div><cpanel langprint="MENUEmailAccounts"></div>
    <p class="description"><cpanel langprint="EmailAdRmDesc"></p>

	<cpanel setvar="vidtut_name=emailaccounts">
	<cpanel setvar="vidtut_header=MENUEmailAccounts">
	<cpanel setvar="vidtut_description=VidPopDesc">
	<cpanel setvar="vidtut_video_name=emailaccount-low">
	<cpanel setvar="vidtut_width=450">
	<cpanel setvar="vidtut_height=345">	
	<cpanel include="../video_tutorial_include.html">

</cpanelfeature>

<!-- This function makes $CPVAR{'maindiscard'} set to 1 or 0 -->
<?cp Email::checkmaindiscard(,) ?>

<cpanelfeature !popaccts> 
    <style text="text/css">
    .disable,.input-button,.popselect,.expbox { display:none }
    </style>
</cpanelfeature>

<cpanelfeature popaccts> 
    <h2><cpanel langprint="mailaddacc"></h2>
    <?cp StatsBar::stat( [p class="caution"]$LANG{'statsattention'}&nbsp;%&nbsp;$LANG{'statsoutof'}&nbsp;%$LANG{'available'}&nbsp;$LANG{'MENUEmailAccounts'}[/p],count,max) display=emailac_counts,warnings=1,warninglevel=80,infinitylang=true ?>
    
  	<cpanelif $CPVAR{'statsbar_emailac_counts_maxed'}>

	<style type="text/css">
	.highlight{ display:none }
	</style>svn s
	<p class="alert_box">
		<cptext '[output,strong,Warning]: You are currently using the maximum number of Email Accounts.'> <cptext 'If you need more please contact your service provider.'>
 </p> 
  </cpanelif>
    
    <form id="mainform" method="post" action="doaddpop.html" name="mainform">	
	<cpanel include="popsinclude.html">
    </form>
    <br />
</cpanelfeature>

<cpanelfeature popaccts>
	
    <h2><cpanel langprint="EACurrentAcct"></h2>
      
    <table width="90%" id="sortable-search" border="0" cellpadding="0" cellspacing="0" >
	<tr>
	    <td align="right">
		<form action="" method="get">
		    <span class="boldit"><cpanel langprint="SESearchButton"></span> <input type="text" size="15" name="searchregex" value="<cpanel print="$FORM{'searchregex'}">" /> <input type="submit" class="input-button" value="<cpanel langprint="go">" />
		</form>
	    </td>
	</tr>
    </table>
	
    <table border="0" cellpadding="0" width="98%" cellspacing="0" class="sortable truncate-table" id="mailtbl">
	<thead>
    <tr>
	    <th><cpanel langprint="Account"></th>
	    <th class="sorttable_nosort"><cpanel langprint="EAAccessWebMail"></th>
	    <th style="padding-left:10px;"><cpanel langprint="usage"></th>
	    <th><cpanel langprint="quota_title"></th>
	    <th class="sorttable_nosort" colspan="4"><cpanel langprint="Functions"></th>
	</tr>
    </thead>
	<tbody>
	
<cpanelif $CPVAR{'mobile'}>
<?cp CommuniGate::listpopswithdisk(
	[tr class="info-%"]
		[td class="cell truncate" truncate="80"]%[/td]
		[td class="cell"][div class="disable" style="width:30px; font-size: 6px; text-align:center; margin: 0 auto;"][a target="_blank" href="webmailform.html?user=%&domain=%"][img alt="$LANG{'Webmail'}" src="$BRANDINGIMG{'symbol-webmail'}" width="19" height="20" border="0" align="middle" /][/a][/div][/td]
		[td nowrap="nowrap" class="cell" style="text-align: center"]%[/td]
		[td class="cell diskused%"]%[/td]
		[td class="maindisp" colspan="4" nowrap="nowrap" style="padding-bottom: 5px;"]
			[form action="redirect.html"]
			[div align="center"]
				[select name="url" class="popselect"]
					[option value="pops_noscript.html" on="on"]$LANG{'selectfunction'}[/option]
					[option value="dodelpop.html?redirectdomain=$FORM{'domain'}&amp;email=%&amp;domain=%"]$LANG{'Delete'}[/option]
					[option value="editquota.html?redirectdomain=$FORM{'domain'}&amp;email=%&amp;domain=%" target="_mainFrame" ]$LANG{'ChangeQuota'}[/option]
					[option value="passwdpop.html?redirectdomain=$FORM{'domain'}&amp;email=%&amp;domain=%" target="_mainFrame"]$LANG{'ChangePassword'}[/option]
					[option target="_mainFrame" value="clientconf.html?redirectdomain=$FORM{'domain'}&amp;acct=%"]$LANG{'ConfigMail'}[/option]
				[/select]
				[input class="input-button" type="submit" value="$LANG{'go'}" /]
			[/div]
			[/form]
		[/td]
	[/tr]
,*num,email,email,domain,humandiskused,diskusedpercent20,humandiskquota,user,domain,user,domain,user,domain,email)
domain=$FORM{'domain'},infinitylang=true || '[tr][td colspan="8" class="errors"]$LANG{'NoAccounts'}($FORM{'domain'}).[/td][/tr]' ?>  
</cpanelif>

<cpanelif !$CPVAR{'mobile'} && $CONF{'SecurityPolicy::SourceIPCheck'}>
	<?cp CommuniGate::listpopswithdisk(
	[tr class="info-%"]
		[td class="cell truncate" truncate="80"]%[/td]
		[td width="32" class="cell"][div class="disable" style="width:30px; font-size: 6px; text-align:center; margin: 0 auto;"][a target="_blank" href="webmailform.html?user=%&amp;domain=%"][img alt="$LANG{'Webmail'}" src="$BRANDINGIMG{'symbol-webmail'}"  width="19" height="20" border="0" align="middle" /][/a][/div][/td]
		[td nowrap="nowrap" class="cell"][div align="center"]%[/div][/td]
		[td class="cell"]%[/td]
		[td class="maindisp" colspan="4" nowrap="nowrap"]
			[form action="redirect.html"]
				[div align="center"]
					[select name="url" class="popselect"]
						[option value="pops_noscript.html"]$LANG{'selectfunction'}[/option]
						[option value="dodelpop.html?redirectdomain=$FORM{'domain'}&amp;email=%&amp;domain=%"]$LANG{'Delete'}[/option]
						[option value="editquota.html?redirectdomain=$FORM{'domain'}&amp;email=%&amp;domain=%"]$LANG{'ChangeQuota'}[/option]
						[option value="passwdpop.html?redirectdomain=$FORM{'domain'}&amp;email=%&amp;domain=%"]$LANG{'ChangePassword'}[/option]
						[option value="../security/index.html?account=%&amp;redirectdomain=$FORM{'domain'}"]$LANG{'SecurityPolicy'}[/option]
						[option value="clientconf.html?redirectdomain=$FORM{'domain'}&acct=%"]$LANG{'ConfigMail'}[/option]
					[/select]
					[input class="input-button" type="submit" value="$LANG{'go'}" /]
				[/div]
			[/form]
		[/td]		
	[/tr]
,*num,email,email,domain,humandiskused,humandiskquota,user,domain,user,domain,user,domain,email,email)
domain=$FORM{'domain'},regex=$FORM{'searchregex'},api2_paginate=1,api2_paginate_start=$FORM{'api2_paginate_start'},api2_paginate_size=$CPVAR{'itemsperpage'},infinitylang=true || '[tr][td colspan="8" class="errors"]$LANG{'NoAccounts'}($FORM{'domain'}).[/td][/tr]' ?>  
</cpanelif>

<cpanelif !$CPVAR{'mobile'} && !$CONF{'SecurityPolicy::SourceIPCheck'}>
<?cp CommuniGate::listpopswithdisk(
	[tr class="info-%"]
		[td class="cell truncate" truncate="80"]%[/td]
		[td width="32" class="cell"][div class="disable" style="width:30px; font-size: 6px; text-align:center; margin: 0 auto;"][a target="_blank" href="webmailform.html?user=%&amp;domain=%"][img alt="" src="$BRANDINGIMG{'symbol-webmail'}" width="19" height="20" border="0" align="middle" /][/a][/div][/td]
		[td nowrap="nowrap" class="cell" style="text-align: center"]%[/td]
		[td class="cell"]%[/td]
		[td class="maindisp" colspan="4" nowrap="nowrap"]
			[form action="redirect.html"]
				[div align="center"]
					[select name="url" class="popselect"]
						[option value="pops_noscript.html"]$LANG{'selectfunction'}[/option]
						[option value="dodelpop.html?redirectdomain=$FORM{'domain'}&amp;email=%&amp;domain=%"]$LANG{'Delete'}[/option]
						[option value="editquota.html?redirectdomain=$FORM{'domain'}&amp;email=%&amp;domain=%"]$LANG{'ChangeQuota'}[/option]
						[option value="passwdpop.html?redirectdomain=$FORM{'domain'}&amp;email=%&amp;domain=%"]$LANG{'ChangePassword'}[/option]
						[option value="clientconf.html?redirectdomain=$FORM{'domain'}&amp;acct=%"]$LANG{'ConfigMail'}[/option]
					[/select]
					[input class="input-button" type="submit" value="$LANG{'go'}" /]
				[/div]
			[/form]
		[/td]
	[/tr]
,*num,email,email,domain,humandiskused,humandiskquota,user,domain,user,domain,user,domain,email)
domain=$FORM{'domain'},regex=$FORM{'searchregex'},api2_paginate=1,api2_paginate_start=$FORM{'api2_paginate_start'},api2_paginate_size=$CPVAR{'itemsperpage'},infinitylang=true || '[tr][td colspan="8" class="errors"]$LANG{'NoAccounts'}($FORM{'domain'}).[/td][/tr]' ?>  
</cpanelif>

	</tbody> 
    </table>

    <?cp UI::paginate(%,paginator) currentpage=$CPVAR{'currentpage'},pages=$CPVAR{'pages'},itemsperpage=$CPVAR{'itemsperpage'} ?>
    <cpanelif $CPVAR{'pages'} && !$CPVAR{'pages'}==1>
	<div style="float:right">
	    <form method="get" action="">
			<cpanel langprint="PaginatorShowing">
			<select name="itemsperpage">
			<?cp UI::paginate_list(
				[option value="%" %]%[/option]
				,item,selected=1?selected="selected" :,item) itemsperpage=$CPVAR{'itemsperpage'},itemlist=10:25:50:100:250:500
			?>
			</select>
			<noscript><button id="my_button" type="submit" value="<cpanel langprint="Change">" /></noscript>
			<cpanel langprint="PaginatorResults">
	    </form>
	</div>
    </cpanelif>

    <br />
    <br />
    <p class="clearit"></p>
<cpanelif $CONF{'maildir'}>
	<cpanel langprint="PopDiskUsageNoteMainAcct">
</cpanelif>
<cpanelif !$CONF{'maildir'}>
	<cpanel langprint="PopDiskUsageNote">
</cpanelif>
    <br />
    <br />
</cpanelfeature>

<cpanelfeature defaultaddress>
    <cpanelif $CPVAR{'maindiscard'}==1>
		<cpanel langprint="MainAcctFail"> <cpanel langprint="MainAcctFail2">
    </cpanelif>
    
    <cpanelif !$CPVAR{'maindiscard'}==1>	
		<h2><cpanel langprint="DefaultMAcct"></h2>
		<p class="description"><cpanel langprint="mainaccdesc"></p>
		<table border="0" cellpadding="2" cellspacing="0" class="sortable truncate-table">
			<tr>
				<th class="cell" width="133" scope="col"><cpanel langprint="Account"></th>
				<th class="cell" width="117" scope="col"><cpanel langprint="EAAccessWebMail"></th>
				<th class="cell-end"><cpanel langprint="usage"></th>
			</tr>
			<tr>
				<td class="cell"><cpanel print="$user"></td>
				<td class="cell"><div class="disable" align="center"><a href="../webmaillogin.html?user=<cpanel print="$user">" target="_blank"><img alt="" src="<cpanel Branding="image(symbol-webmail)">" width="19" height="20" border="0" align="middle" /></a></div></td>
				<td class="cell-end"><cpanel Email="mainacctdiskused()"></td> 
			</tr>
		</table>
    </cpanelif>



</cpanelfeature>

<cpanelfeature !popaccts>
	<cpanel include="../refresh.html">
</cpanelfeature>

<br/>
<br/>
<div id="divgen_expand"></div>

</div><!-- end body-content div -->

<cpanel Branding="include(stdfooter.html)">
